(function($){
	$.fn.hImagesSlide = function(CallerSettings){
		var settings = $.extend({
			container:$("#images-container"),
			nav:$("#slide-nav"), 
			description:$("#description")
		}, CallerSettings||{});
		var $slideImages = settings.container.children("a");
		var $navItems = settings.nav.find("li");
		var $description = settings.description;
		$slideImages.eq(0).css("z-index", "10");
		$description.children("div").eq(0).show().siblings().hide();
		$navItems.click(function(){
			clearInterval(t);
			if($(this).attr("class") != "on"){
				$(this).addClass("on").siblings().removeClass("on");
				var index_showing = $(this).index();
				$description.children("div").eq(index_showing).show().siblings().hide();
				$slideImages.eq(index_showing)
							.stop(true, true)
							.css({opacity:0, zIndex:11})
							.animate({opacity:1}, function(){
														$slideImages.css("z-index", "9");
														$(this).css("z-index", "10");
													})
			}
			t = setInterval(autoShow, 5000);
		});
		
		var t = setInterval(autoShow, 5000);
		/*自动轮换*/
		function autoShow(){
			var count = $navItems.size();
			var index_current = settings.nav.find(".on").index();
			var index_next = index_current + 1 == count ? 0 : index_current + 1;
			$navItems.eq(index_next).trigger("click");
		}
	};
})(jQuery);